//
//  photoBtnView.m
//  PhotoCircle
//
//  Created by wujungao on 1/6/16.
//  Copyright © 2016 wujungao. All rights reserved.
//

#import "photoBtnView.h"

@interface photoBtnView()

@property (weak, nonatomic) IBOutlet UIView *bottomBtnView;
@property (weak, nonatomic) IBOutlet UIButton *photographBtn;
@property (weak, nonatomic) IBOutlet UIButton *albumBtn;
@property (weak, nonatomic) IBOutlet UIButton *cancelBtn;

- (IBAction)photographBtnAction:(UIButton *)sender;
- (IBAction)cancelBtnAction:(UIButton *)sender;
- (IBAction)albumBtnAction:(UIButton *)sender;

@end


@implementation photoBtnView

-(void)awakeFromNib{

    self.frame = CGRectMake(0, 0, SCREEN_W, SCREEN_H);
    self.backgroundColor = [UIColor colorWithRed:0/255.0 green:0/255.0 blue:0/255.0 alpha:0.5];
}

-(void)setFisrtTitle:(NSString*)fString secondTitle:(NSString*)sString
{
    [self.photographBtn setTitle:fString forState:UIControlStateNormal];
    [self.albumBtn setTitle:sString forState:UIControlStateNormal];
}

#pragma mark - btn Actions
- (IBAction)photographBtnAction:(UIButton *)sender {
    
    if([self.photoBtnDelegate respondsToSelector:@selector(photographUpload)]){
        
        [self.photoBtnDelegate photographUpload];
    }
}

- (IBAction)cancelBtnAction:(UIButton *)sender {
    
    if([self.photoBtnDelegate respondsToSelector:@selector(cancelAction)]){
        
        [self.photoBtnDelegate cancelAction];
    }
}

- (IBAction)albumBtnAction:(UIButton *)sender {
    
    if([self.photoBtnDelegate respondsToSelector:@selector(albumUpload)]){
        
        [self.photoBtnDelegate albumUpload];
    }
}

#pragma mark - config view

@end
